package com.lagou.demo;

import com.lagou.edu.mvcframework.annotations.Interceptor;
import com.lagou.edu.mvcframework.interceptor.DefaultAroundInterceptor;
import com.lagou.edu.mvcframework.interceptor.DefaultPermissionInterceptor;
import com.lagou.edu.mvcframework.interceptor.PermissionInterceptor;
import com.lagou.edu.mvcframework.pojo.Invoker;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 * @author liuc
 * @date 2021/4/22
 * @description
 **/
@Interceptor
public class MyInterceptor extends DefaultPermissionInterceptor {

    @Override
    protected boolean hasPermission(HttpServletRequest request, HttpServletResponse response) {
        boolean pass = super.hasPermission(request,response);
        if(pass){
            System.out.println("super permission pass");
        }
        return pass;
    }
}
